var users = domain.listUsers();
for(var i = 0; i < users.size(); i++) {
  var user = users.get(i);
  if (!user.hasRole(Role.admin)) {
    user.addRole(Role.editor);
    updater.update(user);
    log.info(" *** Added editor role to '" + user.getUsername() + "'");
  }
}